package com.xca.znb.model.impl;

import android.content.Context;

import com.xca.znb.database.UserDAO;
import com.xca.znb.entity.Goods;
import com.xca.znb.model.imodel.IHome;

import java.util.List;

public class HomeImpl implements IHome {
    private UserDAO userDAO ;
    public HomeImpl(Context context){userDAO = new UserDAO(context) ;}
    @Override
    public List<Goods> getAllGoods() {
        return userDAO.getGoods();
    }

    @Override
    public List<Goods> getGoodsByType(String type) {
        return userDAO.getGoodsByType(type);
    }

    @Override
    public void addOrUpdateFoot(int goodsId, String user, String time) {
        userDAO.addOrUpdateFoot(goodsId, user, time);
    }
}
